﻿<%--<%@ Page Title="Home Page" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="webfrom_framework._Default" %>

<asp:Content ID="BodyContent" ContentPlaceHolderID="MainContent" runat="server">

    <div class="jumbotron">
        <h1>ASP.NET</h1>
        <p class="lead">ASP.NET is a free web framework for building great Web sites and Web applications using HTML, CSS, and JavaScript.</p>
        <p><a href="http://www.asp.net" class="btn btn-primary btn-lg">Learn more &raquo;</a></p>
    </div>

    <div class="row">
        <div class="col-md-4">
            <h2>Getting started</h2>
            <p>
                ASP.NET Web Forms lets you build dynamic websites using a familiar drag-and-drop, event-driven model.
            A design surface and hundreds of controls and components let you rapidly build sophisticated, powerful UI-driven sites with data access.
            </p>
            <p>
                <a class="btn btn-default" href="https://go.microsoft.com/fwlink/?LinkId=301948">Learn more &raquo;</a>
            </p>
        </div>
        <div class="col-md-4">
            <h2>Get more libraries</h2>
            <p>
                NuGet is a free Visual Studio extension that makes it easy to add, remove, and update libraries and tools in Visual Studio projects.
            </p>
            <p>
                <a class="btn btn-default" href="https://go.microsoft.com/fwlink/?LinkId=301949">Learn more &raquo;</a>
            </p>
        </div>
        <div class="col-md-4">
            <h2>Web Hosting</h2>
            <p>
                You can easily find a web hosting company that offers the right mix of features and price for your applications.
            </p>
            <p>
                <a class="btn btn-default" href="https://go.microsoft.com/fwlink/?LinkId=301950">Learn more &raquo;</a>
            </p>
        </div>
    </div>


</asp:Content>--%>
<script src="Scripts/jquery-3.3.1.js"></script>
<script src="Scripts/my/PowerAjax.js"></script>


<script>
    //$(function () {
    //    $.post("/Default.aspx/TestAjaxMethod", [1, 2, "333", "sss"], function (SucceessResponse) {
    //        alert(1)
    //      });
    //});
    PowerAjax.SyncAjax('TestAjaxMethod', [1, 2, "333", "sss"], function (SucceessResponse) {
                    if (SucceessResponse.IsSuceess) {
                        alert("恭喜，该ajax方法调用成功！");
                        Process(SucceessResponse.ResponseData); // 处理返回的数据，这里可能需要你自己实现了，因为我无法判断你要返回的是什么东西，这是个Object
                    } else {
                        alert("这是操作错误奥，不是内部异常，内部异常的抛出会我内部会处理的！");
                        alert("错误信息:" + SucceessResponse.Message);
                    }
                });
</script>